<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"  xmlns:th="http://www.thymeleaf.org">
<head lang="en">
    <meta charset="UTF-8"/>
    <title>歌曲列表</title>
    <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.4/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="/css/footer.css"/>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <a class="navbar-brand" href="http://music.163.com/#/playlist?id=80450298">网易云音乐歌曲列表(共<span th:text="${songs.totalElements}"></span>首歌曲)</a>
        </div>
    </div>
</nav>

<div class="container" style="margin-top:50px">
    <div class="row">
        <div class="col-sm-8">
            <div class="blog-post">
                <span class="col-sm-8"></span>
            </div>
            <h3><a href="#">网易云音乐爬虫(Web Crawler on 163 Music.com)</a></h3>


            <table class="table">
                <thead>
                <tr>
                    <th>歌曲</th>
                    <th>评论数</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="song: ${songs.content}">
                    <td><a th:text="${song.title}" th:href="@{${song.url}}" target="_blank"></a></td>
                    <td th:text="${song.commentCount}"></td>
                </tr>
                </tbody>
            </table>

            <hr/>
            <nav>
                <ul class="pager">
                    <li th:unless="${songs.first}" class="previous"><a th:href="@{'/songs' + '?page=' + ${songs.number - 1}}">上一页<span aria-hidden="true">&larr;</span></a></li>
                    <li th:unless="${songs.last}" class="next"><a th:href="@{'/songs' + '?page=' + ${songs.number + 1}}">下一页 <span aria-hidden="true">&rarr;</span></a></li>
                </ul>
            </nav>
        </div>
    </div>
</div>
<footer>
    &copy; 2016 Yanjun Wang
</footer>
</body>
</html>